package com.kk.builder;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 建造者模式
 * 指挥者
 *
 * @author 王志强
 * @date 2021-12-14
 */
@Data
@AllArgsConstructor
public class HouseDirector {


    private HouseBuilder houseBuilder;

    public House constructHouse() {
        System.out.println("打地基前，指挥者可进行其他操作");
        houseBuilder.basicBuild();
        houseBuilder.wallBuild();
        houseBuilder.roofBuild();
        return houseBuilder.builderHouse();
    }

}
